<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>全局组件</title>

</head>
<body>

    <div id="app">

        <heima69></heima69>
        <heima69></heima69>

    </div>


<script src="./node_modules/vue/dist/vue.js"></script>
<script>

    //表示声明一个vue的组件，全局组件,组件没有办法绑定一块死的html空间
    Vue.component("heima69",{
        template:`<div>

                    <button @click="age++">我是heima69组件中的按钮,{{age}}</button>
                    </div>`, //template的意思和el的意思相当
        data(){
           return{
               age:18
           }
        }
    })


    var app = new Vue({
        el: "#app",
    });
</script>


</body>
</html>